<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet"   href="../css/Page.css" >
	</head>
	<style>
		*{
	font-family:PingFang-SC-Bold;
}

.mui-bar-nav{
	background: #FFFFFF;
}

.xqsou{
	width: 90%;
	position: relative;
	float: left;
	height: 100%;
	padding-top: 3px;
}
.xqsou >input{
	width: 280px;
	height: 38px;
	position: relative;
	float: left;
	font-size:14px;
font-weight:bold;
color:rgba(152,152,152,1);
background:rgba(245,245,245,1);
border-radius:19px;
border: none;
padding-left: 44px;
}

.xqsou >div{
	position: relative;
	float: right;
	width: 28px;
	height: 38px;
	line-height: 38px;
	font-size:14px;
font-weight:bold;
color:rgba(51,51,51,1);
}

.sous{
	position: absolute;
	width: 22px;
	height: 22px;
	left: 11px;
	top: 12px;
}
a{
	color:rgba(51,51,51,1)!important
}
	.fenye{
			width: 100%;
			height: 50px;
			text-align: center;
			position: absolute;
			bottom: -100px;
		}
.mui-content{
	width: 100%;
	padding: 15px  15px;
	padding-bottom: 60px;
	box-sizing: border-box;
	display: inline-block;
	 background: -webkit-linear-gradient(#ffffff, #F0F0F0); /* Safari 5.1 - 6.0 */
	background: -o-linear-gradient(#ffffff, #F0F0F0); /* Opera 11.1 - 12.0 */
	background: -moz-linear-gradient(#ffffff, #F0F0F0); /* Firefox 3.6 - 15 */
	background: linear-gradient(#ffffff, #F0F0F0); /* 标准的语法 */
}

.dan{
	width: 48%;
	margin-top: 15px;
	margin-left:2%;
	position: relative;
	float: left;
	box-sizing: border-box;
	background: #FFFFFF;
	border-radius:2px 2px 0px 0px;
}
.mui-bar-nav{
            box-shadow:none;
		
		border-bottom:1px  solid rgba(248,248,248,1);
		}

.dan img{
	width: 100%;
	height: 134px;
	position: relative;
	float: left;
}
.biaoti{
	position: relative;
	float: left;
	width: 100%;
	padding: 0  5px;
	line-height: 25px;
	box-sizing: border-box;
	text-align: left;
	height: 25px;
	font-size:13px;
    font-weight:500;
    color:rgba(51,51,51,1);
}  

.jinbi{
	position: relative;
	float: left;
	width: 100%;
	padding: 0  5px;
	line-height: 50px;
	height: 25px;
}
.jinbi>div:nth-child(1){
	position: relative;
	float:left ;
	width: 50%;
	height: 25px;
	line-height: 25px;
	font-size:12px;
font-weight:500;
color:rgba(255,90,90,1);
}
.jinbi>div:nth-child(2){
		position: relative;
		float:left ;
		width: 50%;
		height: 25px;
}
.jinbi>div:nth-child(2)>img{
	position: relative;
	float: right;
	width: 13px;
	height: 13px;
	margin-right: 3px;
	margin-top: 6px;
}
.jinbi>div:nth-child(2)>span{
	position: relative;
	float: right;
    line-height: 25px;
	font-size:12px;
font-weight:500;
color:rgba(153,153,153,1);
}

</style>
	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">搜索详情</h1>
		</header>

		<div class="mui-content"  id="idss">
			<!-- <div class="dan">
				<img id="toplay" class="if"   src="../image/shou10.png"></img>
				<div class="biaoti">路人狂怼占座大妈</div>
				<div class="jinbi">
					<div>金币:59</div>
					<div><span>3000</span><img src="../image/bofang.png" /></div>
				</div>
			</div> -->
			<!-- 
				<div class="dan">
				<img id="toplay" class="if"  src="../image/shou10.png"></img>
				<div class="biaoti">路人狂怼占座大妈</div>
				<div class="jinbi">
					<div>金币:59</div>
					<div><span>3000</span><img src="../image/bofang.png" /></div>
				</div>
			</div> -->
			
				<!-- <div class="dan">
				<img id="toplay" class="if"  src="../image/shou10.png"></img>
				<div class="biaoti">路人狂怼占座大妈</div>
				<div class="jinbi">
					<div>金币:59</div>
					<div><span>3000</span><img src="../image/bofang.png" /></div>
				</div>
			</div> -->
			
				<!-- <div class="dan">
				<img id="toplay" class="if"   src="../image/shou10.png"></img>
				<div class="biaoti">路人狂怼占座大妈</div>
				<div class="jinbi">
					<div>金币:59</div>
					<div><span>3000</span><img src="../image/bofang.png" /></div>
				</div>-->

			</div>
			
			<div class="fenye">
				<div class="pages">
				</div>
			</div>
			

		</div>

			
	</body>
	<script src="../js/mui.min.js"></script>
	<script src="../js/html5video.js"></script>
	<script src="../js/jquery-3.1.1.min.js"></script>
	<script src="../js/Page.js"></script>
	<script type="text/javascript">
		
		mui.init()

		mui.plusReady(function() {
			var url = plus.storage.getItem('url');
			var user = plus.storage.getItem('user');
			user = JSON.parse(user);
			var web = plus.webview.currentWebview();
			var id = web.fenneiid;
			var page = 1;
			$.post(url+'/juyou/index/getfenlei',{page:1,id:id,token:user.token},function(res){
				if(res.code==200){
					$(".mui-title").text(res.data.fenlei.name);
					var str ='';
								$.each(res.data.data.data,function(i,v){
									str+='<div class="dan" data-id="'+v.id+'">'+
						'<img id="toplay" class="if"   src="'+v.covers+'"></img>'+
						'<div class="biaoti">'+v.name+'</div>'+
						'<div class="jinbi">'+
							'<div>金币:'+v.coins+'</div>'+
							'<div><span>'+v.frequency+'</span><img src="../image/bofang.png" /></div>'+
						'</div>'+
					'</div>';
								})
								$("#idss").empty();
								$("#idss").append(str);
								var newpage = new Page($(".pages").eq(0), {
									count: res.data.data.total,
									limit: 6,
									upper: true,
								}, function(tiaojian) {
									getdata(tiaojian.page)
								});
								
				}else{
					mui.toast(res.msg);
				}
			})
			function getdata(page){
				plus.nativeUI.showWaiting();
				$.post(url+'/juyou/index/getfenlei',{page:page,id:id,token:user.token},function(res){
					plus.nativeUI.closeWaiting();
					if(res.code==200){
						var str ='';
						$.each(res.data.data.data,function(i,v){
							str+='<div class="dan" data-id="'+v.id+'">'+
				'<img id="toplay" class="if"   src="'+v.covers+'"></img>'+
				'<div class="biaoti">'+v.name+'</div>'+
				'<div class="jinbi">'+
					'<div>金币:'+v.coins+'</div>'+
					'<div><span>'+v.frequency+'</span><img src="../image/bofang.png" /></div>'+
				'</div>'+
			'</div>';
						})
						$("#idss").empty();
						$("#idss").append(str);
					}else{
						// mui.alert(res.msg);
						mui.toast(res.msg);
					}
				})
				
			}
			// // mui.init({});
			// getdata();
			// mui.toast('message')
			// mui.alert(id)
			var height = document.body.clientHeight;
			$(".mui-content").css("height", height);
			var web = plus.webview.currentWebview();
			var name = web.sou;
			$(".mui-title").text(name);
			mui("#idss").on("tap",".dan",function(){
				var id = $(this).attr('data-id');
				// mui.alert(id)
					mui.openWindow({
					url:'video.html',
					id:"video.html",
					extras: {
					videoid:id,
					},
					show: {
						autoShow: true, //页面loaded事件发生后自动显示，默认为true
						aniShow: "slide-in-right", //页面显示动画，默认为”slide-in-right“；
						duration: 100 //页面动画持续时间，Android平台默认100毫秒，iOS平台默认200毫秒；
					},
					waiting: {
						autoShow: true, //自动显示等待框，默认为true
						title: '正在加载...', //等待对话框上显示的提示内容
					}
					
					
				})
			})
		})

	</script>
</html>
